﻿<UserControl x:Class="NextAppointmentControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
             DataContext="{Binding RelativeSource={RelativeSource Self}}"
             xmlns:local="clr-namespace:Horizon.HMS"
             xmlns:lib="clr-namespace:HMSLibrary;assembly=HMSLibrary"
              xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Assigned Dr.:" Style="{StaticResource TextBlockStyle}"/>
        <ComboBox Grid.Row="1" Margin="2" Name="AssignedDrComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
        <Calendar Name="AppointmentCalendar" Grid.Row="2" SelectionMode="SingleRange" />
        <ScrollViewer Margin="5" Grid.Column="1" Grid.RowSpan="3" >
            <my:DataGrid Name="AppointmentDataGrid" Style="{StaticResource SerachDataGridStyle}" MaxWidth="480" Width="480">
                    <my:DataGrid.Columns>
                    <my:DataGridTextColumn Header="Date Time" Binding="{Binding appDataTime}"/>
                    <my:DataGridTextColumn Header="Patient Name" Binding="{Binding PatientName}"/>
                    <my:DataGridTextColumn Header="Patient ID" Binding="{Binding patientId}"/>
                    <my:DataGridTextColumn Header="Is Confirm?" Binding="{Binding appConfirm}"/>
                    <my:DataGridTextColumn Header="Appointment Type" Binding="{Binding AppointmentTypeName}"/>
                    </my:DataGrid.Columns>
                </my:DataGrid>
            </ScrollViewer>
      
        <Grid Name="MainGrid" Grid.Row="3" Grid.ColumnSpan="3">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="28"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="28"/>
            </Grid.RowDefinitions>
            <TextBlock Text="Date:" Style="{StaticResource TextBlockStyle}"/>
            <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="2">
                <extToolkit:DateTimePicker Grid.Column="3" Height="28" Format="Custom" FormatString="MM/dd/yyyy HH:mm"  Name="AppointDateDatePicker" Width="160" HorizontalAlignment="Left"/>
                <!--<TextBlock Text="Time:" Style="{StaticResource TextBlockStyle}"/>
                <extToolkit:DateTimeUpDown Width="100" HorizontalAlignment="Left" Name="AppointmentTime" Format="ShortTime" />-->
            </StackPanel>
            <local:PatientSearchControl x:Name="PatientControl" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,3"/>
            <TextBlock Text="Appointment Type:" Grid.Row="2" Style="{StaticResource TextBlockStyle}"/>
            <ComboBox Margin="2" Width="250" Name="AppointmentTypeComboBox" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" DisplayMemberPath="Name" SelectedValuePath="ID"/>
            <!--<TextBlock Text="Appointment Status:" Grid.Row="3" Style="{StaticResource TextBlockStyle}"/>
            <ComboBox Margin="2" Width="250" Name="AppointmentStatusComboBox" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" DisplayMemberPath="Name" SelectedValuePath="ID"/>-->
            <StackPanel Grid.Column="1" Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left" Margin="2">
                <RadioButton Content="Confirm" GroupName="s" Name="ConfirmRadioButton" Margin="2" IsChecked="True"/>
                <RadioButton Content="Tentative" Name="TentativeRadioButton" GroupName="s" Margin="2"/>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
